#set cmake version
cmake_minimum_required(VERSION 3.16)

#set build standard
set(CMAKE_CXX_STANDARD 14)

#set project name
project(Detector)

set(CMAKE_BUILD_TYPE "debug")
#find essential package
FIND_PACKAGE(OpenCV REQUIRED)

#include libraries directory
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})

#add file to src_lists,then add sources to executable(RECURSE means cmake will search dir recursively)
file(GLOB_RECURSE src_lists
        *.hpp
        *.h
        ArmorDetectorT.cpp
        )

#add executable file
add_executable(Detector test.cpp ${src_lists})

#dynamic link libraries
target_link_libraries(Detector ${OpenCV_LIBS} -lpthread)
